package com.i8office.android.zhihuixinwu.ui.schedule;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class ScheduleDateTask {

    /**
     * Title : tet1
     * Location : dsfs1f
     * StartDate : 0001-01-01T00:00:00
     * StartTime : 22:40:00
     * hour : 10
     * min : 40
     * TimeQuantum : 3
     * DeptName : bumen1
     * LerderName : 王进健,系统管理员,
     */

    private String Title;
    private String Location;
    private String StartDate;
    private String StartTime;
    private String hour;
    private String min;
    private int TimeQuantum;
    private String DeptName;
    private String LerderName;
    private String time12;
    public String getTitle() {
        return Title;
    }

    public void setTitle(String Title) {
        this.Title = Title;
    }

    public String getLocation() {
        return Location;
    }

    public void setLocation(String Location) {
        this.Location = Location;
    }

    public String getStartDate() {
        return StartDate;
    }

    public void setStartDate(String StartDate) {
        this.StartDate = StartDate;
    }

    public String getStartTime() {
        return StartTime;
    }

    public void setStartTime(String StartTime) {
        this.StartTime = StartTime;
    }

    public String getHour() {
        return hour;
    }

    public void setHour(String hour) {
        this.hour = hour;
    }

    public String getMin() {
        return min;
    }

    public void setMin(String min) {
        this.min = min;
    }

    public int getTimeQuantum() {
        return TimeQuantum;
    }

    public void setTimeQuantum(int TimeQuantum) {
        this.TimeQuantum = TimeQuantum;
    }

    public String getDeptName() {
        return DeptName;
    }

    public void setDeptName(String DeptName) {
        this.DeptName = DeptName;
    }

    public String getLerderName() {
        return LerderName;
    }

    public void setLerderName(String LerderName) {
        this.LerderName = LerderName;
    }

    public String getStartTime12() {
        if (time12 == null) {
            try{
                if("--:--".equals(StartTime)){
                    time12 = StartTime;
                }else{
                    SimpleDateFormat format = new SimpleDateFormat("hh:mm");
                    Calendar calendar = Calendar.getInstance();
                    calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(hour));
                    calendar.set(Calendar.MINUTE, Integer.parseInt(min));
                    time12 = format.format(calendar.getTimeInMillis());
                }
            }catch (Exception e){

            }
        }
        return time12;
    }
}
